// license-header java merge-point
/**
 * This is only generated once! It will never be overwritten.
 * You can (and have to!) safely modify it by hand.
 */
package org.tinaelle.server.domain;
/**
 * @see org.tinaelle.server.domain.AdCurrencyTrl
 */
public class AdCurrencyTrlDaoImpl
    extends org.tinaelle.server.domain.AdCurrencyTrlDaoBase
{
    /**
     * @see org.tinaelle.server.domain.AdCurrencyTrlDao#toAdCurrencyTrlDTO(org.tinaelle.server.domain.AdCurrencyTrl)
     */
    public org.tinaelle.common.dto.AdCurrencyTrlDTO toAdCurrencyTrlDTO(final org.tinaelle.server.domain.AdCurrencyTrl entity)
    {
        return super.toAdCurrencyTrlDTO(entity);
    }

    /**
     * Retrieves the entity object that is associated with the specified value object
     * from the object store. If no such entity object exists in the object store,
     * a new, blank entity is created
     */
    private org.tinaelle.server.domain.AdCurrencyTrl loadAdCurrencyTrlFromAdCurrencyTrlDTO(org.tinaelle.common.dto.AdCurrencyTrlDTO adCurrencyTrlDTO)
    {
        org.tinaelle.server.domain.AdCurrencyTrl adCurrencyTrl = this.load(adCurrencyTrlDTO.getAdCurrencyTrlId());
        if (adCurrencyTrl == null)
        {
            adCurrencyTrl = org.tinaelle.server.domain.AdCurrencyTrl.Factory.newInstance();
        }
        return adCurrencyTrl;
    }

    
    /**
     * @see org.tinaelle.server.domain.AdCurrencyTrlDao#adCurrencyTrlDTOToEntity(org.tinaelle.common.dto.AdCurrencyTrlDTO)
     */
    public org.tinaelle.server.domain.AdCurrencyTrl adCurrencyTrlDTOToEntity(org.tinaelle.common.dto.AdCurrencyTrlDTO adCurrencyTrlDTO)
    {
        org.tinaelle.server.domain.AdCurrencyTrl entity = this.loadAdCurrencyTrlFromAdCurrencyTrlDTO(adCurrencyTrlDTO);
        this.adCurrencyTrlDTOToEntity(adCurrencyTrlDTO, entity, true);
        return entity;
    }
}